from django.conf.urls import url
from assets.views import *

urlpatterns = [
    url(r'^list_user/$', list_user, name='list_user'),
    url(r'^list_administrator/$', list_administrator, name='list_user'),
    url(r'^list_ops_user/$', list_ops_user, name='运维值班表的用户'),
    url(r'^list_test_user/$', list_test_user, name='测试部门的用户'),
    url(r'^list_cc_test_user/$', list_cc_test_user, name='创畅测试部门的用户'),
    url(r'^list_cc_operation_user/$', list_cc_operation_user, name='创畅工作室运营部部门的用户'),
    url(r'^list_operation_user/$', list_operation_user, name='运营部门的用户'),
    url(r'^list_backup_dev/$', list_backup_dev, name='项目分组备用主程'),
    url(r'^list_group/$', list_group, name='下拉展示分组'),
    url(r'^list_register_group/$', list_register_group, name='下拉展示分组,注册时使用'),
    url(r'^list_game_project/$', list_game_project, name='下拉展示游戏项目列表'),
    url(r'^list_project_group/$', list_project_group, name='下拉展示游戏项目分组列表'),
    url(r'^list_room/$', list_room, name='下拉展示机房名称'),
    url(r'^list_ip_room/$', list_ip_room, name='下拉展示ip-机房'),
    url(r'^list_ip_room_game_server/$', list_ip_room_game_server, name='下拉展示ip-机房-区服id'),
    url(r'^list_ip/$', list_ip, name='下拉展示某个机房下的所有机器ip'),
    url(r'^hostAPI/$', hostAPI, name='主机API文档'),
    url(r'^server_permission_api/$', server_permission_api, name='服务器权限接口文档'),
    url(r'^list_business/$', list_business, name='下拉展示业务类型'),
    url(r'^user_host_list/$', user_host_list, name='用户服务器权限列表'),
    url(r'^key_permission_type/$', key_permission_type, name='权限分布类型图表'),
    url(r'^data_key_permission_type/$', data_key_permission_type, name='权限分布类型数据'),
    url(r'^data_user_host_list/$', data_user_host_list, name='用户服务器权限列表数据'),
    url(r'^permission_data_detail/$', permission_data_detail, name='服务器权限详细分布数据'),
    url(r'^permission_data_detail_pie/$', permission_data_detail_pie, name='服务器权限详细分布数据'),
    url(r'^$', calendar, name='calendar'),
    url(r'^upload/$', upload, name='upload'),
    url(r'^import_data/$', import_data, name='import_data'),
    url(r'^(duty_schedule|game_project_list|room|business|host|project_group_list|ops_manager_list)/$',
        cmdb_page, name='cmdb_page'),
    url(r'^game_project_ops_staff/$', game_project_ops_staff, name='game_project_ops_staff'),
    url(r'^data_game_project_ops_staff/$', data_game_project_ops_staff, name='data_game_project_ops_staff'),
    url(r'^get_game_project_related_user/$', get_game_project_related_user, name='get_game_project_related_user'),
    url(r'^add_or_edit_game_project_related_user/$', add_or_edit_game_project_related_user,
        name='add_or_edit_game_project_related_user'),
    url(
        r'^data_(cmdb_duty_schedule|cmdb_fullcalendar|game_project_list|room|business|host|project_group_list|ops_manager_list)/$',
        cmdb_data_obj, name='cmdb_data_obj'),
    url(r'^add_data_cmdb_duty_schedule/$', add_data_cmdb_duty_schedule, name='add_data_cmdb_duty_schedule'),
    url(r'^add_or_edit_game_project/$', add_or_edit_game_project, name='增加或者修改游戏项目'),
    url(r'^add_or_edit_project_group/$', add_or_edit_project_group, name='增加或者修改游戏项目分组'),
    url(r'^add_or_edit_host/$', add_or_edit_host, name='增加或者修改主机'),
    url(r'^add_or_edit_business/$', add_or_edit_business, name='增加或者修改业务类型'),
    url(r'^add_or_edit_room/$', add_or_edit_room, name='增加或者修改机房信息'),
    url(r'^add_or_edit_ops_manager/$', add_or_edit_ops_manager, name='增加或者修改运维管理机'),
    url(r'^add_data_fullcalendar/$', add_data_fullcalendar, name='add_data_fullcalendar'),
    url(r'^edit_data_fullcalendar/$', edit_data_fullcalendar, name='edit_data_fullcalendar'),
    url(r'^edit_data_cmdb_duty_schedule/$', edit_data_cmdb_duty_schedule, name='edit_data_cmdb_duty_schedule'),
    url(
        r'^get_cmdb_(duty_schedule|fullcalendar|game_project_list|room|business|host|project_group_list|ops_manager_list|tecent_cloud_account)/$',
        get_cmdb_obj, name='get_cmdb_obj'),
    url(
        r'^del_data_cmdb_(duty_schedule|fullcalendar|game_project_list|room|business|host|project_group_list|ops_manager_list|cloud|tecent_cloud_account)/$',
        del_cmdb_obj, name='del_cmdb_obj'),

    url(r'^project_svn_api/$', project_svn_api, name='project_svn_api'),
    url(r'^host_download/$', host_download, name='主机导出excel'),
    url(r'^get_host_history_record/$', get_host_history_record, name='主机变更记录数据'),
    url(r'^list_opsmanager/$', list_opsmanager, name='运维管理机列表'),

    url(r'^system_cron_list/$', system_cron_list, name='system_cron_list'),  # 系统作业列表
    url(r'^system_cron_execute/(?P<task_id>[0-9]+)/$', system_cron_execute, name='system_cron_execute'),  # 系统作业执行页面
    url(r'^saltstack_data_host/$', saltstack_data_host, name='选择执行saltstack任务的主机'),
    url(r'^salt_config/(?P<config_id>[0-9]+)/$', salt_config, name='任务配置数据'),
    url(r'^save_salt_config/$', save_salt_config, name='修改任务配置数据'),
    url(r'^salt_config_history/(?P<config_id>[0-9]+)/$', salt_config_history, name='配置修改历史详情'),
    url(r'^history_detail/(?P<history_id>[0-9]+)/$', history_detail, name='修改历史详细记录'),
    url(r'^history_recover/$', history_recover, name='配置回滚'),
    url(r'^salt_config_push/$', salt_config_push, name='配置文件推送'),
    url(r'^start_execute_salt_task/$', start_execute_salt_task, name='开始执行salt任务'),
    url(r'^salt_task_execute_history/(?P<task_id>[0-9]+)/$', salt_task_execute_history, name='salt任务执行记录记录'),
    url(r'^execute_history_detail/(?P<history_id>[0-9]+)/$', execute_history_detail, name='执行历史详情'),
    url(r'^execute_history_host_detail/(?P<id>[0-9]+)/$', execute_history_host_detail, name='执行历史单独主机的详情'),
    url(r'^add_salt_task/$', add_salt_task, name='新增saltstack任务'),
    url(r'^delete_salt_task/$', delete_salt_task, name='删除saltstack任务'),
    url(r'^cdn_api_info/$', cdn_api_info, name='CDN接口信息列表'),
    url(r'^list_cdn_supplier/$', list_cdn_supplier, name='cdn供应商信息'),
    url(r'^add_cdn_api/$', add_cdn_api, name='新增cdn api接口信息'),
    url(r'^get_cdn_api_detail/$', get_cdn_api_detail, name='获取cdn api接口详细信息'),
    url(r'^edit_cdn_api/$', edit_cdn_api, name='修改cdn api接口信息'),
    url(r'^delete_cdn_api/$', delete_cdn_api, name='删除cdn api接口'),
    url(r'^cdn_refresh_page/$', cdn_refresh_page, name='cdn刷新操作及查询结果页面'),
    url(r'^cdn_refresh/$', cdn_refresh, name='cdn刷新'),
    url(r'^manual_query_cdn/$', manual_query_cdn, name='手动查询刷新cdn结果'),
    url(r'^view_fresh_detail/$', view_refresh_detail, name='查看刷新对象详情'),
    url(r'^cdn_refresh_record/$', cdn_refresh_record_page, name='查询cdn刷新记录'),
    url(r'^query_cdn_refresh_record/$', query_cdn_refresh_record, name='查询cdn刷新记录'),
    url(r'^list_cdn_game_project_by_group/$', list_cdn_game_project_by_group, name='根据登录人展示cdn接口信息'),
    url(r'^list_area_from_ops/$', list_area_from_ops, name='根据运维管理机地区字段列出地区'),
    url(r'^host_usage/$', host_usage, name='主机使用率页面'),
    url(r'^data_host_usage/$', data_host_usage, name='主机使用率数据'),
    url(r'^host_recover_migration_apply/$', host_recover_migration_apply, name='主机迁移回收申请'),
    url(r'^area/$', area, name='地区'),
    url(r'^list_all_area_name/$', list_all_area_name, name='列出所有地区信息'),
    url(r'^add_area/$', add_area, name='新增地区信息'),
    url(r'^get_area_detail/$', get_area_detail, name='获取地区详细信息'),
    url(r'^edit_area/$', edit_area, name='修改地区信息'),
    url(r'^delete_area/$', delete_area, name='删除地区信息'),
    url(r'^host_usage_downloads/$', host_usage_downloads, name='导出主机使用率查询结果'),
    url(r'^hostusagedownloads/(\w+).xls/$', hostusagedownloads, name='主机使用率导出下载链接'),
    url(r'^list_area/$', list_area, name='列出地区数据'),
    url(r'^host_migration_callback_api_doc/$', host_migration_callback_api_doc, name='主机迁服回调接口文档'),
    url(r'^host_recover_callback_api_doc/$', host_recover_callback_api_doc, name='主机回收回调接口文档'),
    url(r'^ops_manager_lock/$', ops_manager_lock, name='项目和地区的锁'),
    url(r'^saltstack_history_host_detail/$', saltstack_history_host_detail, name='saltstack任务执行历史记录的主机详情'),
    url(r'^execute_salt_command_page/$', execute_salt_command_page, name='执行salt命令页面'),
    url(r'^execute_salt_command/$', execute_salt_command, name='执行salt命令'),
    url(r'^salt_command_history/$', salt_command_history, name='执行salt命令历史记录'),
    url(r'^salt_command_history_result/(?P<history_id>[0-9]+)/$', salt_command_history_result, name='执行salt命令历史记录结果'),
    url(r'^host_statistics/$', host_statistics, name='主机统计图表页面'),
    url(r'^host_statistics_by_project_chart/$', host_statistics_by_project_chart, name='主机统计图表数据-按项目'),
    url(r'^host_statistics_by_room_chart/$', host_statistics_by_room_chart, name='主机统计图表数据-按机房'),
    url(r'^host_initialize/$', host_initialize, name='主机初始化功能页面'),
    url(r'^data_host_initialize/$', data_host_initialize, name='主机初始化数据'),
    url(r'^add_or_edit_host_initialize_manual/$', add_or_edit_host_initialize_manual, name='添加初始化主机'),
    url(r'^get_initialize_host_info/$', get_initialize_host_info, name='获取初始化主机信息'),
    url(r'^host_initialize_log/(?P<initialize_id>[0-9]+)/$', host_initialize_log, name='主机初始化日志'),
    url(r'^start_host_initialize/$', start_host_initialize, name='开始初始化主机'),
    url(r'^reboot_initialize_host/$', reboot_initialize_host, name='开始重启主机'),
    url(r'^host_initialize_templates_download/(\w+).xlsx/$', host_initialize_templates_download, name='主机初始化excel模板下载'),
    url(r'^host_initialize_batch_excel_import/$', host_initialize_batch_excel_import, name='初始化主机批量excel导入'),
    url(r'^sync_pillar/$', sync_pillar, name='同步pillar'),
    url(r'^cloud/$', cloud, name='云供应商'),
    url(r'^add_or_edit_cloud/$', add_or_edit_cloud, name='增加或者修改云供应商信息'),
    url(r'^tecent_cloud_account/$', tecent_cloud_account, name='腾讯云帐号信息'),
    url(r'^add_or_edit_tecent_cloud_account/$', add_or_edit_tecent_cloud_account, name='增加或者修改腾讯云帐号信息'),
    url(r'^host_trace/$', host_trace, name='主机变更记录页面'),
    url(r'^data_host_trace/$', data_host_trace, name='主机变更追踪数据'),
    url(r'^import_initialize_host/$', import_initialize_host, name='开始入库主机'),
]
